package edu.sctu.practice.class01.nieyu.assign03.assign03_3;

/**
 * Created by Administrator on 2015/10/22.
 */
public class Name implements Cloneable {

    private String firstName;
    private String middleName;

    public Name(String firstName, String middleName, String lastName) {

        this.firstName = firstName;
        this.middleName = middleName;
        this.lastName = lastName;
    }

    @Override
    public Object clone() {

        Object object = null;
        try {
            object = (Name) super.clone();
        } catch (CloneNotSupportedException ex) {
            return null;
        }

        return object;
    }

    public String getAllName(){

        String allName = firstName + middleName + lastName;
        return allName;
    }
    public void setLastName(String lastName) {

        this.lastName = lastName;
    }

    public void setMiddleName(String middleName) {

        this.middleName = middleName;
    }

    public void setFirstName(String firstName) {

        this.firstName = firstName;
    }

    private String lastName;

    public String getFirstName() {

        return firstName;
    }

    public String getMiddleName() {

        return middleName;
    }

    public String getLastName() {

        return lastName;
    }


}
